<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="/diaShop/css/common.css" rel="stylesheet" type="text/css" />
  <link href="/diaShop/css/style.css" rel="stylesheet" type="text/css" />
  <link href="/diaShop/fonts/iconfont.css" rel="stylesheet" type="text/css" />
  <script src="/diaShop/js/jquery-1.9.1.min.js" type="text/javascript"></script>
  <script src="/diaShop/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
  <script src="/diaShop/js/common_js.js" type="text/javascript"></script>
  <script src="/diaShop/js/footer.js" type="text/javascript"></script>
  <script src="/diaShop/js/lrtk.js" type="text/javascript"></script>
  <title>用户注册</title>
</head>

<body>
<div class="log_bg">
  <div class="top">
    <div class="logo"><div class="logo_link"><a href="Index.html"><img src="/diaShop/images/logo.png"></a></div><div class="phone">免费咨询热线：<b>400-567-4556</b></div></div>
  </div>
  <div class="regist">
    <div class="log_img"><img src="/diaShop/images/imgbg_03.png" width="611" height="425"></div>
    <div class="reg_c" id="registered">
      <div class="hd">
        <ul>
          <li>普通注册</li>
        </ul>
      </div>
      <div class="bd">
        <ul>
          <form id="signupForm">
            <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
              <tbody><tr height="50" valign="top">
                <td width="95">&nbsp;</td>
                <td>
                  <span class="fl" style="font-size:24px;">注册</span>
                  <span class="fr">已有商城账号，<a href="/diaShop/login" style="color:#ff4e00;">我要登录</a></span>
                </td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                <td><input type="text" id="username" name="username" value="" class="l_user"></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                <td><input type="password" id="password" name="password" value="" class="l_pwd"></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                <td><input type="password" id="passwordRepeat" name="passwordRepeat" value="" class="l_pwd"></td>
              </tr>

              <tr>
                <td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox"></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                </td>
              </tr>
              <tr height="60">
                <td>&nbsp;</td>
                <td>
                  <button class="log_btn">注册</button></td>
              </tr>
              </tbody></table>
          </form>
        </ul>

      </div>
    </div>
    <script>jQuery("#registered").slide({trigger:"click"});</script>
  </div>
  <div class="btmbg">
    <div class="btm">
      备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br>

    </div>
  </div>
</div>
<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>



<!-- jQuery Validation plugin javascript-->
<script src="/js/plugins/validate/jquery.validate.min.js"></script>
<script src="/js/plugins/validate/messages_zh.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        validateRule();
        //$("#signupForm").validate();
    });
    $.validator.setDefaults({
        submitHandler : function() {
            reg();
        }
    });

    function reg() {
        $.ajax({
            type : "POST",
            url : "/diaShop/reg",
            data : $('#signupForm').serialize(),
            success : function(r) {
                if (r.code == 0) {
                    location.href = '/diaShop/login';
                } else {
                    layer.msg(r.msg);
                }
            }
        });
    }

    function validateRule() {
        $("#signupForm").validate({
            rules : {
                username : {
                    required : true
                },
                password : {
                    required : true
                },
                passwordRepeat : {
                    required : true
                }
            },
            messages : {
                username : {
                    required :  "请输入您的用户名",
                },
                password : {
                    required : "请输入您的密码",
                },
                passwordRepeat : {
                    required : "请输入您的确认密码",
                }
            }
        })
    }
</script>
</body>
</html>
